package date

import "time"

func Date(t time.Time) int32 {
	var year, month, day = t.Date()
	return int32(year*10000 + int(month)*100 + day)
}

func TodayExpire() int {

	var tomorrow = time.Now().AddDate(0, 0, 1)
	var year, month, day = tomorrow.Date()
	return int(time.Date(year, month, day, 0, 0, 0, 0, time.Local).Sub(time.Now()).Seconds())
}
